home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / bcfamily / include / dosdos.h next >
Encoding:
C/C++ Source or Header  |  1993-03-20  |  3.2 KB  |  77 lines

  1. //
  2. //      *******************************************************************
  3. //        JdeBP C++ Library Routines          General Public Licence v1.00
  4. //            Copyright (c) 1991,1992     Jonathan de Boyne Pollard
  5. //      *******************************************************************
  6. //
  7.  
  8. //
  9. //    MS-DOS support for Family API DOS routines
  10. //
  11.  
  12. struct DOSFind_t {
  13.     unsigned char   drive;          // Undocumented DOS
  14.     char            pattern[13];    // Undocumented DOS
  15.     char            reserved[7];
  16.     unsigned char   attrib;
  17.     unsigned        wr_time;
  18.     unsigned        wr_date;
  19.     long            size;
  20.     char            name[13];
  21. };
  22. struct psp {
  23.     short int20;        // Old-style way of exiting program
  24.     PARA memtop;        // Paragraph beyond the top of memory
  25.     BYTE reserved1;
  26.     BYTE cpmcall[5];    // FAR call to MS-DOS int dispatcher
  27.     void far *int22;    // Program terminate address
  28.     void far *int23;    // CTRL-BREAK address
  29.     void far *int24;    // Critical error address
  30.     PARA parentpsp;     // Paragraph of parent's psp
  31.     BYTE handles[20];   // Indices into SFT
  32.     PARA environment;   // Paragraph of environment
  33.     void far *sss;      // Stack-Switch Storage
  34.     short nhands;       // Number of handles
  35.     BYTE far *htable;   // Address of handle table
  36.     BYTE reserved2[24];
  37.     BYTE dosint[3];     // INT21, then FAR RET
  38.     BYTE reserved3[2];
  39.     BYTE fcb1ext[7];    // FCB1 extension
  40.     BYTE fbc1[16];      // FCB1
  41.     BYTE fcb2[16];      // FCB2
  42.     BYTE reserved4[4];
  43.     BYTE cmdlen;        // Length of command line
  44.     BYTE cmdline[127];  // Command line
  45. } ;
  46. struct mcb {
  47.     BYTE type;           // 4D for normal, 5A for end of block
  48.     PARA owner;
  49.     PARA size;
  50.     BYTE unused[3];
  51.     BYTE name[8];
  52. } ;
  53.  
  54. extern "C" {
  55.  
  56. void _APICALL    DosDosSleep18    ( unsigned long ) ;
  57. void _APICALL    DosDosSetDTA     (const void far *) ;
  58. USHORT _APICALL    DosDosFindFirst (const char far *, unsigned short, struct DOSFind_t far *) ;
  59. USHORT _APICALL    DosDosFindNext    (struct DOSFind_t far *) ;
  60. USHORT _APICALL    DosDosDevIOCtl    (int, unsigned short, void far *, unsigned short, unsigned short far *) ;
  61. USHORT _APICALL    DosDosOpen        (const char far *, unsigned short, unsigned short far *) ;
  62. USHORT _APICALL    DosDosSelCurDrive (unsigned short, unsigned short far *) ;
  63. USHORT _APICALL    DosDosQCurDrive (unsigned short far *) ;
  64. USHORT _APICALL    DosDosQFileTime (int, unsigned short far *, unsigned short far *) ;
  65. USHORT _APICALL    DosDosQPSPSeg    (unsigned short far *) ;
  66. USHORT _APICALL    DosDosSetFileTime (int, unsigned short , unsigned short) ;
  67. USHORT _APICALL    DosDosTmpnam    (char far *, unsigned short, char far * far *, unsigned short far *) ;
  68. USHORT _APICALL    DosDosCreate    (const char far *, unsigned short, unsigned short far *) ;
  69. USHORT _APICALL    DosDosWrite        (unsigned short, const void far *, unsigned short, unsigned short far *);
  70. USHORT _APICALL    DosDosXOpen        (const char far *, unsigned short far *, unsigned int far *, unsigned int, unsigned int, unsigned int);
  71. USHORT _APICALL    DosDosRestoreVectors    ( void ) ;
  72. USHORT _APICALL    DosDosSaveVectors    ( void ) ;
  73. void _APICALL    DosDosSetVect    ( unsigned short, void interrupt (far *) () ) ;
  74. void _APICALL    DosDosSleep        ( unsigned short ) ;
  75. void _APICALL    DosDosGetVect    ( USHORT, void interrupt (far * far *PtrVecFN) () ) ;
  76.  
  77. }